


<div class="body" id="content">

<table width="750" cellpadding="6" cellspacing="1"  border="0" align="center" style="text-align:center;">
<tr style="background: skyBlue;">
<td>Client</td>
<td>E-mail</td>
<td>Téléphone</td>
<td>Imprimer</td>
<td style="background:#eee;"><?php if(isset($_GET['member_id'])){?><a href="<?=site_url('admin990/members/orders')?>/<?=$_GET['member_id']?>?per_page=<?=$_GET['per_page']?>"><?}else{?><a href="<?=site_url('admin990/orders/date')?>/<?=$order_info->order_time->format('Y/m/d')?>/<?=$_GET['per_page']?>"><?php }?>return</a></td>

</tr>
<tr >
<td><?=$order_info->member->firstname?>&nbsp;<?=$order_info->member->lastname?></td><td><?=$order_info->member->email?></td>
<td><?=$order_info->member->tel?></td>
<td><a href="javascript:void(0)" class="print" rel="content"><img src="<?=base_url('resources/imgs/printer.png')?>" width="18" alt="imprimer" title="imprimer"></a></td>
</tr>
<tr style="background: skyBlue;">
<td>ID</td>
<td>Numéro de commande</td>
<td>Réduction</td>
<td>Supplément</td>
<td>Total</td>


</tr>
<tr>
<td><?=$order_info->id?></td>
<td><?=$order_info->order_num?></td>
<td><?=$order_info->discount*100?> %</td>
<td><?if($order_info->extra != NULL){?><?=$order_info->extra?> €<?php }else{?>- - - <?php }?></td>
<td><?=number_format($order_info->total*(1-$order_info->discount)+$order_info->extra,1,'.','')?> €</td>
</tr>
<tr style="background: skyBlue;">

<td>NUM</td>
<td>Article</td>
<td>Prix</td>
<td>Quantité</td>
<td>Sous-Total</td>

</tr>
<?php foreach($order as $o):?>
<tr class="border_bottom">

<td><?=$o->product_num?></td>
<td><?=$o->product_name?></td>
<td><?=$o->product_price?> €</td>
<td><?=$o->qty?></td>
<td><?=($o->product_price+$o->additional_price)*$o->qty?> €</td>
</tr>
<?php if($o->option){?><?php echo '<tr  class="border_bottom"><td><label>OPTIONs:</label> </td><td>'.$o->option.'</td></tr>' ; }?>
<?php endforeach;?>
</table>

<hr>
<div class="mode" style="width:750px;margin:auto;">
order id : <?=str_pad($order_info->id, 7, '0', STR_PAD_LEFT)?><br>
order time: <?=$order_info->order_time?><br><br>
<?php if($order_info->reservation !=NULL){?>
<h4>Réservation : <?=$order_info->reservation?></h4>
<?php }else{?>
<h4>Commande Immédiate: <?=date('d-M-Y')?></h4>
<?php }?>

<?php if($order_info->order_type == 'delivery'):?>
<h4>Livraison: <?=$order_info->delivery_time?></h4>
<b>Sonnette: </b>  <?=$address->ring?><br>
<b>Adresse: </b>  <?=$address->house_num?> <?=$address->address?><br>
<b>Commune: </b>  <?=$address->postal?> <?=$address->community?><br>
<b>Téléphone:  </b> <?=$address->tele?>
<?php endif;?>
<?php if($order_info->order_type == 'take away'):?>
<h4>Emporter à <?=$order_info->takeaway_time?></h4>
<b>Nom: </b>  <?=$order_info->member->firstname?> <?=$order_info->member->lastname?><br>
<b>Téléphone: </b>  <?=$order_info->member->tel?>
<?php endif;?>
<br>
<hr>
<b>Message: </b> <br><?=$order_info->message?>
</div>

</div>


<script src="<?=base_url()?>resources/js/jquery.PrintArea.js_4.js"></script>
<script>
$(".print").click(function(){

	                           $("#content").printArea( );
                      });
</script>
